package com.zzw.thread.safe;

import java.util.concurrent.atomic.AtomicLong;

/**
 * @author zzw
 * @see
 * @since 2018/3/30
 */
public class AtomicCounter implements Counter {

    private AtomicLong counter = new AtomicLong();

    @Override
    public void increment() {
        counter.incrementAndGet();
    }

    @Override
    public long getCounter() {
        return counter.get();
    }
}
